package bist.believeinstep.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bist.believeinstep.domain.Menu;

public class MenuMapper implements RowMapper<Menu>{
	public Menu mapRow(ResultSet rs, int rowNum) throws SQLException{
		
		Menu menu = new Menu();
		
		menu.setId(rs.getInt("id"));
		menu.setName(rs.getString("name"));
		menu.setCreated(rs.getTimestamp("created_date"));
		menu.setModified(rs.getTimestamp("modified_date"));
		menu.setCreatedBy(rs.getString("created_by"));
		menu.setModifiedBy(rs.getString("modified_by"));
		
		return menu;
	}
}
